﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YTCMS.Domain.Entities
{
    [Table("custom")]
    public partial class custom
    {
        [Key]
        public int Id { get; set; }
        [Required(ErrorMessage="目的地必填")]
        [MaxLength(500,ErrorMessage="目的地最大长度为500")]
        public string Destination { get; set; }


        [Required(ErrorMessage = "出发日期必填")]
        public System.DateTime DepartTime { get; set; }
        
        
        [Required(ErrorMessage = "旅行天数必填")]
        [RegularExpression(@"^\d+$", ErrorMessage = "请输入正确的数字！")]
        public Nullable<int> Day { get; set; }
        
        
        [Required(ErrorMessage = "费用预算必填")]
        [RegularExpression(@"^(-)?(([1-9]{1}\d*)|([0]{1}))(\.(\d){1,2})?$", ErrorMessage = "请输入正确的金额！")]
        public Nullable<decimal> Money { get; set; }
        [Required(ErrorMessage="姓名必填")]
        [MaxLength(200)]
        public string Name { get; set; }


        [RegularExpression(@"^\d+$", ErrorMessage = "请输入正确的数字！")]
        public Nullable<int> Num { get; set; }
        

       
        [Required(ErrorMessage = "联系方式必填")]
        [MaxLength(200)]
        public string Contact { get; set; }

        [RegularExpression(@"^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i", ErrorMessage = "请输入正确的邮箱！")]
        [MaxLength(200)]
        public string Email { get; set; }
        public Nullable<int> Object { get; set; }
        public string Remark { get; set; }
    }
}
